
# data_list = json_str.get("page").get("results")
# for item in data_list:
#     title = item.get("name")
#     print(title)

from curl_cffi import requests

headers = {
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
}
url = "https://pixabay.com/zh/images/search/?pagi=5"
# SSLError verify=False
response = requests.get(url, headers=headers, impersonate="chrome99", verify=False)
print(response.text)
result = response.content.decode()
with open("pixabay.html", "w", encoding="utf-8") as f:
    f.write(result)
